3.7.98 \(\int \frac {(d \cos (e+f x))^m}{a+b \tan (e+f x)} \, dx\) [698]

Optimal. Leaf size=140 \[ \frac {b (d \cos (e+f x))^m \, _2F_1\left (1,-\frac {m}{2};1-\frac {m}{2};\frac {b^2 \sec ^2(e+f x)}{a^2+b^2}\right )}{\left (a^2+b^2\right ) f m}+\frac {F_1\left (\frac {1}{2};1,\frac {2+m}{2};\frac {3}{2};\frac {b^2 \tan ^2(e+f x)}{a^2},-\tan ^2(e+f x)\right ) (d \cos (e+f x))^m \sec ^2(e+f x)^{m/2} \tan (e+f x)}{a f} \]

[Out]

b*(d*cos(f*x+e))^m*hypergeom([1, -1/2*m],[1-1/2*m],b^2*sec(f*x+e)^2/(a^2+b^2))/(a^2+b^2)/f/m+AppellF1(1/2,1,1+
1/2*m,3/2,b^2*tan(f*x+e)^2/a^2,-tan(f*x+e)^2)*(d*cos(f*x+e))^m*(sec(f*x+e)^2)^(1/2*m)*tan(f*x+e)/a/f

________________________________________________________________________________________

Rubi [A]
time = 0.16, antiderivative size = 140, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 6, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.261, Rules used = {3596, 3593, 771, 440, 455, 70} \begin {gather*} \frac {\tan (e+f x) \sec ^2(e+f x)^{m/2} (d \cos (e+f x))^m F_1\left (\frac {1}{2};1,\frac {m+2}{2};\frac {3}{2};\frac {b^2 \tan ^2(e+f x)}{a^2},-\tan ^2(e+f x)\right )}{a f}+\frac {b (d \cos (e+f x))^m \, _2F_1\left (1,-\frac {m}{2};1-\frac {m}{2};\frac {b^2 \sec ^2(e+f x)}{a^2+b^2}\right )}{f m \left (a^2+b^2\right )} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(d*Cos[e + f*x])^m/(a + b*Tan[e + f*x]),x]

[Out]

(b*(d*Cos[e + f*x])^m*Hypergeometric2F1[1, -1/2*m, 1 - m/2, (b^2*Sec[e + f*x]^2)/(a^2 + b^2)])/((a^2 + b^2)*f*
m) + (AppellF1[1/2, 1, (2 + m)/2, 3/2, (b^2*Tan[e + f*x]^2)/a^2, -Tan[e + f*x]^2]*(d*Cos[e + f*x])^m*(Sec[e +
f*x]^2)^(m/2)*Tan[e + f*x])/(a*f)

Rule 70

Int[((a_) + (b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[(b*c - a*d)^n*((a + b*x)^(m + 1)/(b^(
n + 1)*(m + 1)))*Hypergeometric2F1[-n, m + 1, m + 2, (-d)*((a + b*x)/(b*c - a*d))], x] /; FreeQ[{a, b, c, d, m
}, x] && NeQ[b*c - a*d, 0] &&  !IntegerQ[m] && IntegerQ[n]

Rule 440

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_), x_Symbol] :> Simp[a^p*c^q*x*AppellF1[1/n, -p,
 -q, 1 + 1/n, (-b)*(x^n/a), (-d)*(x^n/c)], x] /; FreeQ[{a, b, c, d, n, p, q}, x] && NeQ[b*c - a*d, 0] && NeQ[n
, -1] && (IntegerQ[p] || GtQ[a, 0]) && (IntegerQ[q] || GtQ[c, 0])

Rule 455

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_))^(q_.), x_Symbol] :> Dist[1/n, Subst[Int
[(a + b*x)^p*(c + d*x)^q, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p, q}, x] && NeQ[b*c - a*d, 0] && EqQ[m
- n + 1, 0]

Rule 771

Int[((d_) + (e_.)*(x_))^(m_)*((a_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Int[ExpandIntegrand[(a + c*x^2)^p, (d/(d
^2 - e^2*x^2) - e*(x/(d^2 - e^2*x^2)))^(-m), x], x] /; FreeQ[{a, c, d, e, p}, x] && NeQ[c*d^2 + a*e^2, 0] &&
!IntegerQ[p] && ILtQ[m, 0]

Rule 3593

Int[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Dist[d^(2*
IntPart[m/2])*((d*Sec[e + f*x])^(2*FracPart[m/2])/(b*f*(Sec[e + f*x]^2)^FracPart[m/2])), Subst[Int[(a + x)^n*(
1 + x^2/b^2)^(m/2 - 1), x], x, b*Tan[e + f*x]], x] /; FreeQ[{a, b, d, e, f, m, n}, x] && NeQ[a^2 + b^2, 0] &&
 !IntegerQ[m/2]

Rule 3596

Int[(cos[(e_.) + (f_.)*(x_)]*(d_.))^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[(d*Co
s[e + f*x])^m*(d*Sec[e + f*x])^m, Int[(a + b*Tan[e + f*x])^n/(d*Sec[e + f*x])^m, x], x] /; FreeQ[{a, b, d, e,
f, m, n}, x] &&  !IntegerQ[m]

Rubi steps

\begin {align*} \int \frac {(d \cos (e+f x))^m}{a+b \tan (e+f x)} \, dx &=\left ((d \cos (e+f x))^m (d \sec (e+f x))^m\right ) \int \frac {(d \sec (e+f x))^{-m}}{a+b \tan (e+f x)} \, dx\\ &=\frac {\left ((d \cos (e+f x))^m \sec ^2(e+f x)^{m/2}\right ) \text {Subst}\left (\int \frac {\left (1+\frac {x^2}{b^2}\right )^{-1-\frac {m}{2}}}{a+x} \, dx,x,b \tan (e+f x)\right )}{b f}\\ &=\frac {\left ((d \cos (e+f x))^m \sec ^2(e+f x)^{m/2}\right ) \text {Subst}\left (\int \left (\frac {a \left (1+\frac {x^2}{b^2}\right )^{-1-\frac {m}{2}}}{a^2-x^2}+\frac {x \left (1+\frac {x^2}{b^2}\right )^{-1-\frac {m}{2}}}{-a^2+x^2}\right ) \, dx,x,b \tan (e+f x)\right )}{b f}\\ &=\frac {\left ((d \cos (e+f x))^m \sec ^2(e+f x)^{m/2}\right ) \text {Subst}\left (\int \frac {x \left (1+\frac {x^2}{b^2}\right )^{-1-\frac {m}{2}}}{-a^2+x^2} \, dx,x,b \tan (e+f x)\right )}{b f}+\frac {\left (a (d \cos (e+f x))^m \sec ^2(e+f x)^{m/2}\right ) \text {Subst}\left (\int \frac {\left (1+\frac {x^2}{b^2}\right )^{-1-\frac {m}{2}}}{a^2-x^2} \, dx,x,b \tan (e+f x)\right )}{b f}\\ &=\frac {F_1\left (\frac {1}{2};1,\frac {2+m}{2};\frac {3}{2};\frac {b^2 \tan ^2(e+f x)}{a^2},-\tan ^2(e+f x)\right ) (d \cos (e+f x))^m \sec ^2(e+f x)^{m/2} \tan (e+f x)}{a f}+\frac {\left ((d \cos (e+f x))^m \sec ^2(e+f x)^{m/2}\right ) \text {Subst}\left (\int \frac {\left (1+\frac {x}{b^2}\right )^{-1-\frac {m}{2}}}{-a^2+x} \, dx,x,b^2 \tan ^2(e+f x)\right )}{2 b f}\\ &=\frac {b (d \cos (e+f x))^m \, _2F_1\left (1,-\frac {m}{2};1-\frac {m}{2};\frac {b^2 \sec ^2(e+f x)}{a^2+b^2}\right )}{\left (a^2+b^2\right ) f m}+\frac {F_1\left (\frac {1}{2};1,\frac {2+m}{2};\frac {3}{2};\frac {b^2 \tan ^2(e+f x)}{a^2},-\tan ^2(e+f x)\right ) (d \cos (e+f x))^m \sec ^2(e+f x)^{m/2} \tan (e+f x)}{a f}\\ \end {align*}

________________________________________________________________________________________

Mathematica [C] Result contains complex when optimal does not.
time = 13.97, size = 1132, normalized size = 8.09 \begin {gather*} \frac {(d \cos (e+f x))^m \left (b \left (-1+\sec ^2(e+f x)^{-m/2}\right )+a m \, _2F_1\left (\frac {1}{2},1+\frac {m}{2};\frac {3}{2};-\tan ^2(e+f x)\right ) \tan (e+f x)-b F_1\left (m;\frac {m}{2},\frac {m}{2};1+m;\frac {a-i b}{a+b \tan (e+f x)},\frac {a+i b}{a+b \tan (e+f x)}\right ) \sec ^2(e+f x)^{-m/2} \left (\frac {b (-i+\tan (e+f x))}{a+b \tan (e+f x)}\right )^{m/2} \left (\frac {b (i+\tan (e+f x))}{a+b \tan (e+f x)}\right )^{m/2}\right )}{f (a+b \tan (e+f x)) \left (a m \, _2F_1\left (\frac {1}{2},1+\frac {m}{2};\frac {3}{2};-\tan ^2(e+f x)\right ) \sec ^2(e+f x)-b m \sec ^2(e+f x)^{-m/2} \tan (e+f x)+b m F_1\left (m;\frac {m}{2},\frac {m}{2};1+m;\frac {a-i b}{a+b \tan (e+f x)},\frac {a+i b}{a+b \tan (e+f x)}\right ) \sec ^2(e+f x)^{-m/2} \tan (e+f x) \left (\frac {b (-i+\tan (e+f x))}{a+b \tan (e+f x)}\right )^{m/2} \left (\frac {b (i+\tan (e+f x))}{a+b \tan (e+f x)}\right )^{m/2}-b \sec ^2(e+f x)^{-m/2} \left (\frac {b (-i+\tan (e+f x))}{a+b \tan (e+f x)}\right )^{m/2} \left (\frac {b (i+\tan (e+f x))}{a+b \tan (e+f x)}\right )^{m/2} \left (-\frac {(a-i b) b m^2 F_1\left (1+m;1+\frac {m}{2},\frac {m}{2};2+m;\frac {a-i b}{a+b \tan (e+f x)},\frac {a+i b}{a+b \tan (e+f x)}\right ) \sec ^2(e+f x)}{2 (1+m) (a+b \tan (e+f x))^2}-\frac {(a+i b) b m^2 F_1\left (1+m;\frac {m}{2},1+\frac {m}{2};2+m;\frac {a-i b}{a+b \tan (e+f x)},\frac {a+i b}{a+b \tan (e+f x)}\right ) \sec ^2(e+f x)}{2 (1+m) (a+b \tan (e+f x))^2}\right )-\frac {1}{2} b m F_1\left (m;\frac {m}{2},\frac {m}{2};1+m;\frac {a-i b}{a+b \tan (e+f x)},\frac {a+i b}{a+b \tan (e+f x)}\right ) \sec ^2(e+f x)^{-m/2} \left (\frac {b (-i+\tan (e+f x))}{a+b \tan (e+f x)}\right )^{-1+\frac {m}{2}} \left (\frac {b (i+\tan (e+f x))}{a+b \tan (e+f x)}\right )^{m/2} \left (-\frac {b^2 \sec ^2(e+f x) (-i+\tan (e+f x))}{(a+b \tan (e+f x))^2}+\frac {b \sec ^2(e+f x)}{a+b \tan (e+f x)}\right )-\frac {1}{2} b m F_1\left (m;\frac {m}{2},\frac {m}{2};1+m;\frac {a-i b}{a+b \tan (e+f x)},\frac {a+i b}{a+b \tan (e+f x)}\right ) \sec ^2(e+f x)^{-m/2} \left (\frac {b (-i+\tan (e+f x))}{a+b \tan (e+f x)}\right )^{m/2} \left (\frac {b (i+\tan (e+f x))}{a+b \tan (e+f x)}\right )^{-1+\frac {m}{2}} \left (-\frac {b^2 \sec ^2(e+f x) (i+\tan (e+f x))}{(a+b \tan (e+f x))^2}+\frac {b \sec ^2(e+f x)}{a+b \tan (e+f x)}\right )+a m \sec ^2(e+f x) \left (-\, _2F_1\left (\frac {1}{2},1+\frac {m}{2};\frac {3}{2};-\tan ^2(e+f x)\right )+\left (1+\tan ^2(e+f x)\right )^{-1-\frac {m}{2}}\right )\right )} \end {gather*}

Warning: Unable to verify antiderivative.

[In]

Integrate[(d*Cos[e + f*x])^m/(a + b*Tan[e + f*x]),x]

[Out]

((d*Cos[e + f*x])^m*(b*(-1 + (Sec[e + f*x]^2)^(-1/2*m)) + a*m*Hypergeometric2F1[1/2, 1 + m/2, 3/2, -Tan[e + f*
x]^2]*Tan[e + f*x] - (b*AppellF1[m, m/2, m/2, 1 + m, (a - I*b)/(a + b*Tan[e + f*x]), (a + I*b)/(a + b*Tan[e +
f*x])]*((b*(-I + Tan[e + f*x]))/(a + b*Tan[e + f*x]))^(m/2)*((b*(I + Tan[e + f*x]))/(a + b*Tan[e + f*x]))^(m/2
))/(Sec[e + f*x]^2)^(m/2)))/(f*(a + b*Tan[e + f*x])*(a*m*Hypergeometric2F1[1/2, 1 + m/2, 3/2, -Tan[e + f*x]^2]
*Sec[e + f*x]^2 - (b*m*Tan[e + f*x])/(Sec[e + f*x]^2)^(m/2) + (b*m*AppellF1[m, m/2, m/2, 1 + m, (a - I*b)/(a +
 b*Tan[e + f*x]), (a + I*b)/(a + b*Tan[e + f*x])]*Tan[e + f*x]*((b*(-I + Tan[e + f*x]))/(a + b*Tan[e + f*x]))^
(m/2)*((b*(I + Tan[e + f*x]))/(a + b*Tan[e + f*x]))^(m/2))/(Sec[e + f*x]^2)^(m/2) - (b*((b*(-I + Tan[e + f*x])
)/(a + b*Tan[e + f*x]))^(m/2)*((b*(I + Tan[e + f*x]))/(a + b*Tan[e + f*x]))^(m/2)*(-1/2*((a - I*b)*b*m^2*Appel
lF1[1 + m, 1 + m/2, m/2, 2 + m, (a - I*b)/(a + b*Tan[e + f*x]), (a + I*b)/(a + b*Tan[e + f*x])]*Sec[e + f*x]^2
)/((1 + m)*(a + b*Tan[e + f*x])^2) - ((a + I*b)*b*m^2*AppellF1[1 + m, m/2, 1 + m/2, 2 + m, (a - I*b)/(a + b*Ta
n[e + f*x]), (a + I*b)/(a + b*Tan[e + f*x])]*Sec[e + f*x]^2)/(2*(1 + m)*(a + b*Tan[e + f*x])^2)))/(Sec[e + f*x
]^2)^(m/2) - (b*m*AppellF1[m, m/2, m/2, 1 + m, (a - I*b)/(a + b*Tan[e + f*x]), (a + I*b)/(a + b*Tan[e + f*x])]
*((b*(-I + Tan[e + f*x]))/(a + b*Tan[e + f*x]))^(-1 + m/2)*((b*(I + Tan[e + f*x]))/(a + b*Tan[e + f*x]))^(m/2)
*(-((b^2*Sec[e + f*x]^2*(-I + Tan[e + f*x]))/(a + b*Tan[e + f*x])^2) + (b*Sec[e + f*x]^2)/(a + b*Tan[e + f*x])
))/(2*(Sec[e + f*x]^2)^(m/2)) - (b*m*AppellF1[m, m/2, m/2, 1 + m, (a - I*b)/(a + b*Tan[e + f*x]), (a + I*b)/(a
 + b*Tan[e + f*x])]*((b*(-I + Tan[e + f*x]))/(a + b*Tan[e + f*x]))^(m/2)*((b*(I + Tan[e + f*x]))/(a + b*Tan[e
+ f*x]))^(-1 + m/2)*(-((b^2*Sec[e + f*x]^2*(I + Tan[e + f*x]))/(a + b*Tan[e + f*x])^2) + (b*Sec[e + f*x]^2)/(a
 + b*Tan[e + f*x])))/(2*(Sec[e + f*x]^2)^(m/2)) + a*m*Sec[e + f*x]^2*(-Hypergeometric2F1[1/2, 1 + m/2, 3/2, -T
an[e + f*x]^2] + (1 + Tan[e + f*x]^2)^(-1 - m/2))))

________________________________________________________________________________________

Maple [F]
time = 0.99, size = 0, normalized size = 0.00 \[\int \frac {\left (d \cos \left (f x +e \right )\right )^{m}}{a +b \tan \left (f x +e \right )}\, dx\]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((d*cos(f*x+e))^m/(a+b*tan(f*x+e)),x)

[Out]

int((d*cos(f*x+e))^m/(a+b*tan(f*x+e)),x)

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*cos(f*x+e))^m/(a+b*tan(f*x+e)),x, algorithm="maxima")

[Out]

integrate((d*cos(f*x + e))^m/(b*tan(f*x + e) + a), x)

________________________________________________________________________________________

Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*cos(f*x+e))^m/(a+b*tan(f*x+e)),x, algorithm="fricas")

[Out]

integral((d*cos(f*x + e))^m/(b*tan(f*x + e) + a), x)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\left (d \cos {\left (e + f x \right )}\right )^{m}}{a + b \tan {\left (e + f x \right )}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*cos(f*x+e))**m/(a+b*tan(f*x+e)),x)

[Out]

Integral((d*cos(e + f*x))**m/(a + b*tan(e + f*x)), x)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*cos(f*x+e))^m/(a+b*tan(f*x+e)),x, algorithm="giac")

[Out]

integrate((d*cos(f*x + e))^m/(b*tan(f*x + e) + a), x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {{\left (d\,\cos \left (e+f\,x\right )\right )}^m}{a+b\,\mathrm {tan}\left (e+f\,x\right )} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((d*cos(e + f*x))^m/(a + b*tan(e + f*x)),x)

[Out]

int((d*cos(e + f*x))^m/(a + b*tan(e + f*x)), x)

________________________________________________________________________________________